package tech.senri.iot.socket.model

import io.netty.buffer.Unpooled
import io.swagger.annotations.ApiModelProperty
import tech.senri.iot.socket.service.util.getArray

class UpdateAislesCapacityRequest : RequestMessage()
{
    override fun contentData(): ByteArray
    {
        return Unpooled.buffer()
            .writeShort(aisleCount)
            .writeBytes(aisleCapacity.map { it.toByte() }.toByteArray())
            .getArray()
    }

    @ApiModelProperty("货道数量")
    var aisleCount: Int = 0

    @ApiModelProperty("货道容量，数组形式对应每个货道")
    var aisleCapacity: IntArray = intArrayOf()
}
